package com.test40_JDBC.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 部门
 */
public class Dept implements Serializable {
    private Long deptno;
    private String dname;
    private String loc;
    private List<Emp> emps;

    public Dept() {
        this(null, null, null);
    }

    public Dept(Long deptno, String dname, String loc) {
        this.deptno = deptno;
        this.dname = dname;
        this.loc = loc;
        this.emps = new ArrayList<>();
    }

    @Override
    public String toString() {
        return "【部门】编号：" + this.deptno + "、名称：" + this.dname + "、位置：" + this.loc;
    }

    public Long getDeptno() {
        return deptno;
    }

    public void setDeptno(Long deptno) {
        this.deptno = deptno;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public String getLoc() {
        return loc;
    }

    public void setLoc(String loc) {
        this.loc = loc;
    }

    public List<Emp> getEmps() {
        return emps;
    }

    public void setEmps(List<Emp> emps) {
        this.emps = emps;
    }
}
